package com.futurelight.recipes.dao;

import androidx.room.TypeConverter;

import com.futurelight.recipes.model.Result;
import com.google.gson.Gson;
public class ResultsConvert {
    @TypeConverter
    public Result stringToResult(String string){
        return new Gson().fromJson(string,Result.class);
    }

    @TypeConverter
    public String resultToString(Result result){
        if(result == null){
            return "Result = null";
        }
        return new Gson().toJson(result);
    }
}
